home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / il / ilDilateImg.z / ilDilateImg
Encoding:
Text File  |  2002-10-03  |  18.2 KB  |  331 lines

  1.  
  2.  
  3.  
  4. iiiillllDDDDiiiillllaaaatttteeeeIIIImmmmgggg((((3333))))     IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll     iiiillllDDDDiiiillllaaaatttteeeeIIIImmmmgggg((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      iiiillllDDDDiiiillllaaaatttteeeeIIIImmmmgggg - class to perform morphological dilation
  10.  
  11. IIIINNNNHHHHEEEERRRRIIIITTTTSSSS FFFFRRRROOOOMMMM
  12.      ilLink : ilImage : ilCacheImg : ilMemCacheImg : ilOpImg : ilSpatialImg
  13.  
  14. HHHHEEEEAAAADDDDEEEERRRR FFFFIIIILLLLEEEE
  15.      #include <il/ilDilateImg.h>
  16.  
  17. CCCCLLLLAAAASSSSSSSS DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  18.      This class is publicly derived from ilSpatialImg and performs
  19.      morphological dilation.  This operation is defined on "binary" or
  20.      "grayscale" images.  "Binary" or "grayscale" has nothing to do with color
  21.      models, but indicates how the pixel values or intensities are
  22.      interpreted.  A binary image in this sense contains no more than two
  23.      levels or intensity values: zero and not zero.  An 8-bit image with 256
  24.      pixel intensities can be treated as a binary image: 0 pixel intensity
  25.      representing one level, and all intensities between 1 and 255
  26.      representing another level.  That is, the full range of pixel intensities
  27.      is collapsed into two levels.  A grayscale image includes more than two
  28.      intensity values.  The same 8-bit image is now treated, as it is by any
  29.      other operator, as an image with 256 pixel intensities.  Typically, the
  30.      input image has a single channel.  If input is multichanneled, then the
  31.      operations are performed on each channel independently.
  32.  
  33.      Derived from ilSpatialImg, the dilation operation involves moving a
  34.      kernel across an image.  The operation performed, however, is not a
  35.      weighted sum.  In morphological operations, the kernel is called a
  36.      "structuring element" (SE), and is represented by an _i_l_K_e_r_n_e_l object.
  37.      The SE, like the input image, can be interpreted as "binary" or
  38.      "grayscale".
  39.  
  40.      The interpretation of the numbers that make up an SE depends on the type
  41.      of morphological operation being performed.  The type of operation can be
  42.      specified by the enumerated type, _i_l_M_o_r_p_h_T_y_p_e, that is defined in
  43.      <_i_l/_i_l_T_y_p_e_s._h>.  Negative SE elements are always treated as logical
  44.      "don't cares"; when the operation is in progress, image pixels under
  45.      negative SE elements are ignored.  Thus, the support of the SE is limited
  46.      to those elements that are nonnegative ( >= 0 ). This permits the
  47.      creation of odd-shaped SEs.  The image pixel under the SEs origin is the
  48.      one potentially modified. You can change the origin of the SE by using
  49.      ilKernel's sssseeeettttOOOOrrrriiiiggggiiiinnnn() function.  If not specified, the origin defaults
  50.      to (M/2, N/2) for a M x N SE.
  51.  
  52.      The result of dilation on a binary image (regardless of whether the SE is
  53.      binary or grayscale) is to turn every pixel either "ON" or "OFF" That is,
  54.      a pixel in the output image is assigned one of two intensities: the "ON"
  55.      intensity or the "OFF" intensity. The "ON" intensity is set to equal the
  56.      maximum value of this class and the "OFF" intensity is set to equal the
  57.      minimum value of this class. These can be set using the sssseeeettttMMMMiiiinnnnVVVVaaaalllluuuueeee() and
  58.      sssseeeettttMMMMaaaaxxxxVVVVaaaalllluuuueeee() functions inherited from ilImage.  If not set, these values
  59.      are inherited from the input image.
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. iiiillllDDDDiiiillllaaaatttteeeeIIIImmmmgggg((((3333))))     IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll     iiiillllDDDDiiiillllaaaatttteeeeIIIImmmmgggg((((3333))))
  71.  
  72.  
  73.  
  74.      The interpretation of the image or SE as binary or grayscale can be
  75.      controlled through the enumerated type, _i_l_M_o_r_p_h_T_y_p_e.  Depending on this
  76.      interpretation, the output varies.
  77.  
  78.      If the input image and the SE are binary (_i_l_M_o_r_p_h_T_y_p_e = _i_l_B_i_n_B_i_n), then
  79.      the SE is used to peform a hit-or-miss operation.  That is, if a 0-valued
  80.      image pixel falls under a 0 SE element, or if a positive ( > 0 ) image
  81.      pixel falls under a positive ( > 0 ), the image pixel beneath the SE
  82.      origin is assigned the ON intensity (maximum value); otherwise, it is
  83.      assigned the OFF intensity.
  84.  
  85.      If the input image is binary and the SE is grayscale (_i_l_M_o_r_p_h_T_y_p_e =
  86.      _i_l_B_i_n_G_r_a_y), then the nonnegative ( >= 0 ) SE elements determine the
  87.      support area.  That is, image pixels under negative SE elements are
  88.      ignored.  If a positive ( > 0 ) image pixel ( > 0 ) falls under a
  89.      nonnegative ( >= 0 ) SE element.  Then the target pixel, under the SE
  90.      origin, is assigned the ON intensity (maximum value); otherwise, it is
  91.      assigned the OFF intensity.
  92.  
  93.      Typically for binary images, the SE is composed of -1s and +1s.
  94.  
  95.      If the input image is grayscale, then the dilate operation amounts to
  96.      computing the maximum of the image pixels within the SE support area.
  97.  
  98.      If the input image is grayscale and the SE type is binary (_i_l_M_o_r_p_h_T_y_p_e =
  99.      _i_l_G_r_a_y_B_i_n), then the maximum value of the image pixels falling under
  100.      positive ( > 0 ) SE elements is computed and assigned to the target
  101.      pixel.  This is similar to the operation of ilMaxFltImg.
  102.  
  103.      If the input image and SE are both grayscale and a "set" operation is
  104.      desired (_i_l_M_o_r_p_h_T_y_p_e = _i_l_G_r_a_y_G_r_a_y_S_e_t), then the maximum value of the
  105.      image pixels falling under nonnegative
  106.      ( >= 0 ) SE elements is computed and assigned to the target pixel.
  107.  
  108.      If a "function" operation is desired (_i_l_M_o_r_p_h_T_y_p_e = _i_l_G_r_a_y_G_r_a_y_F_c_t), then
  109.      the computation is the same as for _i_l_G_r_a_y_G_r_a_y_S_e_t, except that the SE
  110.      elements are added to the image pixels before computing the maximum
  111.      value.
  112.  
  113.      Functions are provided to dynamically change the type of morphological
  114.      operation (_i_l_M_o_r_p_h_T_y_p_e) being performed.  Derived from ilSpatialImg,
  115.      ilDilateImg inherits functions like sssseeeettttKKKKeeeerrrrnnnneeeellll() and sssseeeettttKKKKeeeerrrrnnnneeeellllSSSSiiiizzzzeeee() that
  116.      can be used to change the SE.
  117.  
  118.      The edge mode can be specified as described for ilSpatialImg.
  119.  
  120.      The minimum and maximum pixel values, _m_i_n_V_a_l_u_e and _m_a_x_V_a_l_u_e, are
  121.      adjusted.  The values are based on the input minimum and maximum pixel
  122.      values, and in the case where _i_l_M_o_r_p_h_T_y_p_e = _i_l_G_r_a_y_G_r_a_y_F_c_t, on the SE
  123.      element values also.  If the adjusted minimum and maximum pixel values
  124.      are outside the range of values supported by the current data type, then
  125.      the data type is promoted to support the new range of values.  This
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. iiiillllDDDDiiiillllaaaatttteeeeIIIImmmmgggg((((3333))))     IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll     iiiillllDDDDiiiillllaaaatttteeeeIIIImmmmgggg((((3333))))
  137.  
  138.  
  139.  
  140.      occurs only if the data type has not already been explicitly set.
  141.  
  142.      If the data type has not been explicitly set, the minimum and maximum
  143.      pixel values are set to the new adjusted values.  The _m_i_n_V_a_l_u_e and
  144.      _m_a_x_V_a_l_u_e values can be used.  For example, use them when the results of
  145.      the dilation need to be displayed on a monitor and the data must be
  146.      scaled to fit the range of values allowed by the display.
  147.  
  148.      Valid data types for this operation are _i_l_U_C_h_a_r, _i_l_U_S_h_o_r_t and _i_l_U_L_o_n_g.
  149.  
  150. CCCCLLLLAAAASSSSSSSS MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN SSSSUUUUMMMMMMMMAAAARRRRYYYY
  151.      CCCCoooonnnnssssttttrrrruuuuccccttttoooorrrr
  152.  
  153.           ilDilateImg(ilImage* inputImage, ilMorphType mtype = ilBinGray,
  154.                    ilKernel* se = NULL, ilEdgeMode edgeMode = ilPadSrc)
  155.  
  156.      ggggeeeetttt////sssseeeetttt iiiillllMMMMoooorrrrpppphhhhTTTTyyyyppppeeee
  157.  
  158.           ilMorphType getMorphType()
  159.           void setMorphType(ilMorphType type)
  160.  
  161.  
  162. FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNNSSSS
  163.      iiiillllDDDDiiiillllaaaatttteeeeIIIImmmmgggg(((())))
  164.  
  165.           ilDilateImg(ilImage* inputImage, ilMorphType mtype = ilBinGray,
  166.                       ilKernel* se = NULL, ilEdgeMode edgeMode = ilPadSrc)
  167.  
  168.  
  169.           The constructor specifies the source image, _i_n_p_u_t_I_m_a_g_e; the type of
  170.           morphological operation _m_t_y_p_e; the structuring element, _s_e; and the
  171.           edge mode, _e_d_g_e_M_o_d_e.  All of the parameters can be altered using the
  172.           appropriate set function:  sssseeeettttIIIInnnnppppuuuutttt(((()))), sssseeeettttMMMMoooorrrrpppphhhhTTTTyyyyppppeeee(), sssseeeettttKKKKeeeerrrrnnnneeeellll(((()))),
  173.           and sssseeeettttEEEEddddggggeeeeMMMMooooddddeeee(((()))).
  174.  
  175.      ggggeeeettttMMMMoooorrrrpppphhhhTTTTyyyyppppeeee(((())))
  176.  
  177.           ilMorphType getMorphType()
  178.  
  179.  
  180.           Returns the type of morphological operation currently being
  181.           performed.
  182.  
  183.      sssseeeettttMMMMoooorrrrpppphhhhTTTTyyyyppppeeee(((())))
  184.  
  185.           void setMorphType(ilMorphType type)
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. iiiillllDDDDiiiillllaaaatttteeeeIIIImmmmgggg((((3333))))     IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll     iiiillllDDDDiiiillllaaaatttteeeeIIIImmmmgggg((((3333))))
  203.  
  204.  
  205.  
  206.           Sets the type of morphological operation to be performed to _t_y_p_e.
  207.  
  208. IIIINNNNHHHHEEEERRRRIIIITTTTEEEEDDDD MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNNSSSS
  209.    IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm iiiillllSSSSppppaaaattttiiiiaaaallllIIIImmmmgggg
  210.      calcPage(), getEdgeMode(), getKernelSize(), getPage(), resetOp(),
  211.      setEdgeMode(), setKernel(), setKernelSize(), setKernFlags()
  212.  
  213.    IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm iiiillllOOOOppppIIIImmmmgggg
  214.      checkMinMax(), clearClamp(), getBias(), getClamp(), getInputMax(),
  215.      getInputMin(), getInputScaleMax(), getInputScaleMin(), getValidOrders(),
  216.      getValidTypes(), isClamped(), isDiff(), isPrecisionKept(),
  217.      keepPrecision(), resetOp(), setBias(), setClamp(), setMaxPageSize(),
  218.      setMinPageSize(), setValidOrder(), setValidType(), setWorkingType()
  219.  
  220.    IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg
  221.      allocPage(), doUserPageAlloc(), enableMP(), executeRequest(),
  222.      finishRequest(), freePage(), getGlobalThrashMode(), getMpRequest(),
  223.      getPage(), getPageAllocTime(), getPageTime(), getRetainMode(),
  224.      getRetainPath(), getThrashMode(), getThrashTime(), getTotalPageTime(),
  225.      isMPenabled(), isUserPageAlloc(), prepareRequest(),
  226.      setGlobalThrashMode(), setPage(), setPageAllocTime(), setRetainMode(),
  227.      setRetainPath(), setThrashMode(),
  228.  
  229.    IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm iiiillllCCCCaaaacccchhhheeeeIIIImmmmgggg
  230.      enablePagingCallback(), flush(), getCacheSize(),
  231.      isPagingCallbackEnabled(), listResident()
  232.  
  233.    IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm iiiillllIIIImmmmaaaaggggeeee
  234.      addInput(), allocFillData(), checkColorModel(), checkValidOrder(),
  235.      checkValidType(), clipTile(), configureRetainedCache(), copy(),
  236.      copyTile(), copyTile3D(), copyTileCfg(), fillTile(), fillTile3D(),
  237.      fillTileRGB(), freeFillData(), getColorImg(), getColorModel(),
  238.      getColormap(), getCompression(), getConfig(), getCopyConverter(),
  239.      getCsize(), getDataType(), getDimensions(), getDirectInput(),
  240.      getDisplayCacheEnable(), getFill(), getFillData(), getFillValue(),
  241.      getHeight(), getHwEnable(), getHwHint(), getHwIntHint(), getHwOp(),
  242.      getHwPassTable(), getInput(), getInputTileRequirement(),
  243.      getLockTileSet(), getMaxColormapLevels(), getMaxValue(), getMinValue(),
  244.      getNumChans(), getNumInputs(), getOrder(), getOrientation(),
  245.      getPageBorder(), getPageBorderX(), getPageBorderY(), getPageBorderZ(),
  246.      getPageCounts(), getPageDelta(), getPageDimensions(), getPageIndices(),
  247.      getPageOrigin(), getPageOriginC(), getPageOriginX(), getPageOriginY(),
  248.      getPageOriginZ(), getPageSize(), getPageSizeC(), getPageSizePix(),
  249.      getPageSizeVal(), getPageSizeX(), getPageSizeY(), getPageSizeZ(),
  250.      getPixel(), getPixel3D(), getPriority(), getScaleMax(), getScaleMin(),
  251.      getSize(), getStrides(), getSubTile(), getSubTile3D(), getTile(),
  252.      getTile3D(), getWidth(), getXsize(), getYsize(), getZsize(),
  253.      hasPageBorder(), hasPages(), hwDefine(), hwGetPass(), inherit(),
  254.      initColorModel(), initHwEnable(), initMinMax(), initPageSize(),
  255.      initScaleMinMax(), isColorImg(), isIntegral(), isMirrorOrientation(),
  256.      isPartialPage(), isSigned(), isValidPage(), isWritable(), lockPage(),
  257.      lockPageSet(), lockTile(), lockTile3D(), mapFlipTrans(), mapFromInput(),
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. iiiillllDDDDiiiillllaaaatttteeeeIIIImmmmgggg((((3333))))     IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll     iiiillllDDDDiiiillllaaaatttteeeeIIIImmmmgggg((((3333))))
  269.  
  270.  
  271.  
  272.      mapFromSource(), mapOrientation(), mapSize(), mapTile(), mapToInput(),
  273.      mapToSource(), mapXY(), mapXYSign(), outOfBound(), qCopyTileCfg(),
  274.      qFillTile3D(), qFillTileRGB(), qGetSubTile3D(), qGetTile3D(),
  275.      qLockPageSet(), qSetSubTile3D(), qSetTile3D(), removeHwHint(),
  276.      removeInput(), reset(), setColorModel(), setColormap(), setCompression(),
  277.      setCsize(), setDataType(), setDisplayCacheEnable(), setFill(),
  278.      setFillValue(), setHwEnable(), setHwHint(), setHwIntHint(), setInput(),
  279.      setMaxColormapLevels(), setMaxValue(), setMinValue(), setNumChans(),
  280.      setNumInputs(), setOrder(), setOrientation(), setPageBorder(),
  281.      setPageSize(), setPageSizeC(), setPageSizeZ(), setPixel(), setPixel3D(),
  282.      setPriority(), setScaleMinMax(), setScaleType(), setSize(), setSubTile(),
  283.      setSubTile3D(), setTile(), setTile3D(), setTileRequirementFunction(),
  284.      setWritable(), setXsize(), setYsize(), setZsize(), unlockPage(),
  285.      unlockPageSet()
  286.  
  287.    IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm iiiillllLLLLiiiinnnnkkkk
  288.      addResetCallback(), alterAction(), anyAltered(), clearAllowed(),
  289.      clearSet(), clearStatus(), deleteRelated(), disableAltered(),
  290.      dumpChain(), getClassPropSet(), getDescription(), getDirectParent(),
  291.      getDisabledIndex(), getFloatProp(), getGenerationID(), getIntProp(),
  292.      getMaxIndex(), getMinIndex(), getNumChildren(), getNumParents(),
  293.      getParent(), getProp(), getProp(), getPropSet(), getPtrProp(),
  294.      getRelatedChild(), getRelatedDelete(), getRelatedType(), getStatus(),
  295.      hasResetCallbacks(), ilGetClassPropSet(), inProgress(), isAllowed(),
  296.      isAltered(), isEnabled(), isRelated(), isSet(), markSet(), mpUnlock(),
  297.      neverReset(), newRelatedType(), removeParent(), removeProp(),
  298.      removeResetCallback(), reset(), resetAltered(), resetCheck(),
  299.      setAllowed(), setAltered(), setDescription(), setDisabledIndex(),
  300.      setEnabled(), setParent(), setProp(), setPropAltered(),
  301.      setRelatedDelete(), setRelatedType(), setStatus(), stopWatching(),
  302.      unalterable(), watch(), watchNotify()
  303.  
  304. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  305.      ilImage, ilCacheImg, ilMemCacheImg, ilOpImg, ilSpatialImg, ilErodeImg
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.